
class Circle{
    private double radius;
    Circle(){

    }
    Circle(double radius){
        this.radius=radius;
    }
    public void setRadius(double radius){
        if( radius <=0){
            System.out.println(radius+"不符合实际");
        }else{
            this.radius=radius;
        }

    }
    public double getArea(){
        double Area = Math.PI*radius*radius;
        return  Area;
    }
}
public class T3 {
    public static void main(String[] args) {
        Circle c1 = new Circle(3);
        System.out.println("该圆的面积为："+c1.getArea());
    }
}